<html>
<head>

    <script type="text/javascript">
        function getEventTrigger(event) {
            x = event.target;
            alert("The id is => "  + x.id);
        }
    </script>

</head>
<body>
<p id="p1" onmousedown="getEventTrigger(event)">click me</p>

</body>
</html>